home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / ddj0492.zip / HANDPRIN.URC / Recognizer / Greek.h < prev    next >
Text File  |  1992-03-04  |  12KB  |  434 lines

  1. /*fm_mathcommands.h fcodes header file*/
  2. /*    for FrameMath: Sept. 13, 1989   */
  3. /* Copyright Ron Avitzur 1988          */
  4.  
  5. /* node types */
  6. #define NUM_OP                    0x1000
  7. #define PROMPT_OP                0x1001
  8. #define ATOMIC_OP                0x1002
  9. #define DUMMY_OP                0x1003
  10. #define STRING_OP                0x1004
  11. #define INDICES_OP            0x1005
  12. #define CHEM_OP                0x1006
  13. #define TENSOR_OP                0x1007
  14. #define MATRIX                    0x1008
  15. #define VLIST_OP                0x1009
  16. #define SEMI_OP                0x100a
  17. #define MULT_OP                0x100b
  18. #define FXN_OP                    0x100c
  19. #define PLUS_OP                0x100d
  20. #define EQUAL_OP                0x100e
  21. #define COMMALIST_OP            0x100f
  22. #define JOTDOT_OP                0x1010
  23. #define JOTCROSS_OP            0x1011
  24. #define JOTPLUS_OP            0x1012
  25. #define MAP_OP                    0x1013
  26. #define GOESTO_OP                0x1014
  27. #define SWAP_OP                0x1015
  28. #define ARROWDBLLEFT_OP        0x1016
  29. #define ARROWDBLRIGHT_OP    0x1017
  30. #define ARROWDBLBOTH_OP        0x1018
  31. #define NEQ_OP                    0x1019
  32. #define LESS_OP                0x101a
  33. #define LESSEQ_OP                0x101b
  34. #define GREATER_OP            0x101c
  35. #define GREATEREQ_OP            0x101d
  36. #define MUCHGREATER_OP        0x101e
  37. #define MUCHLESS_OP            0x101f
  38. #define EQUIV_OP                0x1020
  39. #define PROPTO_OP                0x1021
  40. #define APPROX_OP                0x1022
  41. #define CONGRUENT_OP            0x1023
  42. #define SIMILAR_OP            0x1024
  43. #define PERPENDICULAR_OP    0x1025
  44. #define PARALLEL_OP            0x1026
  45. #define INTERSECTION_OP        0x1027
  46. #define UNION_OP                0x1028
  47. #define PROPERSUPERSET_OP    0x1029
  48. #define REFLEXSUPERSET_OP    0x102a
  49. #define PROPERSUBSET_OP        0x102b
  50. #define REFLEXSUBSET_OP        0x102c
  51. #define NOTSUBSET_OP            0x102d
  52. #define ELEMENTOF_OP            0x102e
  53. #define NOTELEMENT_OP        0x102f
  54. #define LOGICALAND_OP        0x1030
  55. #define LOGICALOR_OP            0x1031
  56. #define SUCHTHAT_OP            0x1032
  57. #define DOTMATH_OP            0x1033
  58. #define SUBST_OP                0x1034
  59. #define FACT_OP                0x1035
  60. #define DAGGER_OP                0x1036
  61. #define COMPCONJ_OP            0x1037
  62. #define PLUSORMINUS_OP        0x1038
  63. #define MINUSORPLUS_OP        0x1039
  64. #define NEG_OP                    0x103a
  65. #define SIN_OP                    0x103b
  66. #define COS_OP                    0x103c
  67. #define TAN_OP                    0x103d
  68. #define COT_OP                    0x103e
  69. #define CSC_OP                    0x103f
  70. #define SEC_OP                    0x1040
  71. #define ASIN_OP                0x1041
  72. #define ACOS_OP                0x1042
  73. #define ATAN_OP                0x1043
  74. #define ACOT_OP                0x1044
  75. #define ACSC_OP                0x1045
  76. #define ASEC_OP                0x1046
  77. #define SINH_OP                0x1047
  78. #define COSH_OP                0x1048
  79. #define TANH_OP                0x1049
  80. #define COTH_OP                0x104a
  81. #define CSCH_OP                0x104b
  82. #define SECH_OP                0x104c
  83. #define ASINH_OP                0x104d
  84. #define ACOSH_OP                0x104e
  85. #define ATANH_OP                0x104f
  86. #define ACOTH_OP                0x1050
  87. #define ACSCH_OP                0x1051
  88. #define ASECH_OP                0x1052
  89. #define SGN_OP                    0x1053
  90. #define LOG_OP                    0x1054
  91. #define SQRT_OP                0x1055
  92. #define DEL_OP                    0x1056
  93. #define DELDOT_OP                0x1057
  94. #define DELCROSS_OP            0x1058
  95. #define LAP_OP                    0x1059
  96. #define BOX_OP                    0x105a
  97. #define BOXDOT_OP                0x105b
  98. #define BOX2_OP                0x105c
  99. #define UNARYEQ_OP            0x105d
  100. #define ANGLE_OP                0x105e
  101. #define LOGICALNOT_OP        0x105f
  102. #define THEREFORE_OP            0x1060
  103. #define FORALL_OP                0x1061
  104. #define THEREEXISTS_OP        0x1062
  105. #define DIFFERENTIAL_OP        0x1063
  106. #define VARIATIONAL_OP        0x1064
  107. #define PARTIALDIFF_OP        0x1065
  108. #define DELTA_OP                0x1066
  109. #define COMMA_OP                0x1067
  110. #define COVAR_OP                0x1068
  111. #define TOTALOP_OP            0x1069
  112. #define PARTIALOP_OP            0x106a
  113. #define SUM_OP                    0x106b
  114. #define PRODUCT_OP            0x106c
  115. #define INTEGRAL_OP            0x106d
  116. #define LOOPINT_OP            0x106e
  117. #define EXTUNION_OP            0x106f
  118. #define EXTINTERSXN_OP        0x1070
  119. #define LEFTBRACE_OP            0x1071
  120. #define RIGHTBRACE_OP        0x1072
  121. #define BTMBRACE_OP            0x1073
  122. #define TOPBRACE_OP            0x1074
  123. #define ID_OP                    0x1075
  124. #define ABS_OP                    0x1076
  125. #define NORM_OP                0x1077
  126. #define EXPECT_OP                0x1078
  127. #define BRA_OP                    0x1079
  128. #define KET_OP                    0x107a
  129. #define OVERBAR_OP            0x107b
  130. #define DIV_OP                    0x107c
  131. #define TOTHE_OP                0x107d
  132. #define TENTOTHE_OP            0x107e
  133. #define LIMIT_OP                0x107f
  134. #define CHOICE_OP                0x1080
  135. #define COMMUTATOR_OP        0x1081
  136. #define ANTICOMMUTATOR_OP    0x1082
  137. #define BRACKET_OP            0x1083
  138. #define INNERPROD_OP            0x1084
  139. #define DOT_OP                    0x1085
  140. #define CROSS_OP                0x1086
  141. #define DIVIDE_OP                0x1087
  142. #define FRACTION_OP            0x1088
  143. #define FLOOR_OP                0x1089
  144. #define CIELING_OP            0x108a
  145. #define LN_OP                    0x108b
  146. #define EXP_OP                    0x108c
  147. #define ARG_OP                    0x108d
  148. #define IMAG_OP                0x108e
  149. #define REAL_OP                0x108f
  150.  
  151. #define PARTIAL_OP            0x1f91
  152. #define TOTAL_OP                0x1f92
  153.  
  154. /* fxn-codes for greek atoms */
  155. #define c_ALPHA                0x1300
  156. #define c_BETA                    0x1301
  157. #define c_CHI                    0x1302
  158. #define c_delta                0x1303
  159. #define c_DELTA                0x1304
  160. #define c_EPSILON                0x1305
  161. #define c_phi                    0x1306
  162. #define c_phi1                    0x1307
  163. #define c_PHI                    0x1308
  164. #define c_gamma                0x1309
  165. #define c_GAMMA                0x130a
  166. #define c_ETA                    0x130b
  167. #define c_IOTA                    0x130c
  168. #define c_KAPPA                0x130d
  169. #define c_lambda                0x130e
  170. #define c_LAMBDA                0x130f
  171. #define c_MU                    0x1310
  172. #define c_NU                    0x1311
  173. #define c_pi                    0x1312
  174. #define c_PI                    0x1313
  175. #define c_theta                0x1314
  176. #define c_theta1                0x1315
  177. #define c_THETA                0x1316
  178. #define c_RHO                    0x1317
  179. #define c_sigma                0x1318
  180. #define c_sigma1                0x1319
  181. #define c_SIGMA                0x131a
  182. #define c_TAU                    0x131b
  183. #define c_upsilon                0x131c
  184. #define c_Upsilon                0x131d
  185. #define c_omega                0x131e
  186. #define c_omega1                0x131f
  187. #define c_OMEGA                0x1320
  188. #define c_xi                    0x1321
  189. #define c_XI                    0x1322
  190. #define c_psi                    0x1323
  191. #define c_PSI                    0x1324
  192. #define c_ZETA                    0x1325
  193. #define c_INFINITY            0x1326
  194. #define c_PERPENDICULAR        0x1327
  195. #define c_ELLIPSIS            0x1328
  196. #define c_ALEPH                0x1329
  197. #define c_IFRAKTUR            0x132a
  198. #define c_RFRAKTUR            0x132b
  199. #define c_WEIERSTRAUSS        0x132c
  200. #define c_EMPTYSET            0x132d
  201. #define c_PARTIALDIFF        0x132e
  202. #define c_DELCHAR                0x132f
  203. #define c_MINUTE                0x1330
  204. #define c_SECOND                0x1331
  205. #define c_DEGREE                0x1332
  206.  
  207. /* fxn-codes for diacritical marks */
  208. #define d_DOT                    0x1500
  209. #define d_TILDE                0x1501
  210. #define d_BAR                    0x1502
  211. #define d_PRIME                0x1503
  212. #define d_HAT                    0x1504
  213. #define d_VECTOR                0x1505
  214. #define d_SUBTILDE            0x1506
  215. #define d_SUBBOX                0x1507
  216. #define d_DUMMY                0x1508
  217.  
  218. /* fxn-codes to move the insertion point */
  219. #define TAB_CODE                0x1600
  220. #define ARROW_UP                0x1601
  221. #define ARROW_DOWN            0x1602
  222. #define ARROW_RIGHT            0x1603
  223. #define ARROW_LEFT            0x1604
  224. #define SPACE_UP                0x1605
  225. #define SPACE_DOWN            0x1606
  226. #define SPACE_RIGHT            0x1607
  227. #define SPACE_LEFT            0x1608
  228. #define DELETE_CODE            0x1609
  229.  
  230. /* fxn-codes for micro-positioning */
  231. #define ADJUST_ONE_UP        0x1700
  232. #define ADJUST_ONE_DOWN        0x1701
  233. #define ADJUST_ONE_LEFT        0x1702
  234. #define ADJUST_ONE_RIGHT    0x1703
  235. #define ADJUST_FIFTH_UP        0x1704
  236. #define ADJUST_FIFTH_DOWN    0x1705
  237. #define ADJUST_FIFTH_LEFT    0x1706
  238. #define ADJUST_FIFTH_RIGHT    0x1707
  239. #define ADJUST_HOME            0x1708
  240. #define ADJUST_HOMEALL        0x1709
  241. #define SHIM_PLUS_UP            0x170a
  242. #define SHIM_PLUS_DOWN        0x170b
  243. #define SHIM_PLUS_LEFT        0x170c
  244. #define SHIM_PLUS_RIGHT        0x170d
  245. #define SHIM_MINUS_UP        0x170e
  246. #define SHIM_MINUS_DOWN        0x170f
  247. #define SHIM_MINUS_LEFT        0x1710
  248. #define SHIM_MINUS_RIGHT    0x1711
  249. #define SHIM_REMOVE_ALL        0x1712
  250.  
  251. /* fxn-codes for alignment */
  252. #define MATH_ALIGN_LEFT            0x1740
  253. #define MATH_ALIGN_RIGHT        0x1741
  254. #define MATH_ALIGN_CENTER        0x1742
  255. #define MATH_ALIGN_TOP            0x1743
  256. #define MATH_ALIGN_BOTTOM        0x1744
  257. #define MATH_ALIGN_BASELINE    0x1745
  258. #define MATH_ALIGN_EQUAL        0x1746
  259. #define MATH_ALIGN_EQUAL_L        0x1747
  260. #define MARK_ALIGN_RIGHT        0x1748
  261. #define MARK_ALIGN_LEFT            0x1749
  262. #define MARK_ALIGN_CLEAR        0x174a
  263. #define MATRIX_FIXED_WIDTH        0x174b
  264. #define MATRIX_PROP_WIDTH        0x174c
  265. #define MATRIX_TOGGLE_WIDTH    0x174d
  266. #define MATRIX_FIXED_HEIGHT    0x174e
  267. #define MATRIX_PROP_HEIGHT        0x174f
  268. #define MATRIX_TOGGLE_HEIGHT    0x1750
  269.  
  270. /* fxn-codes misc new */
  271. #define MAKE_PLAIN            0x1780
  272. #define MAKE_BOLD                0x1781
  273. #define MAKE_ITALIC            0x1782    
  274. #define LINE_BREAK_RIGHT    0x1783
  275. #define LINE_BREAK_LEFT        0x1784
  276. #define LINE_BREAK_CLEAR    0x1785
  277. #define MATH_EXP1_INC_KLUGE 0x17c0 
  278. #define MATH_EXP1_DEC_KLUGE 0x17c1 
  279. #define MATH_EXP2_INC_KLUGE 0x17c2 
  280. #define MATH_EXP2_DEC_KLUGE 0x17c3 
  281.  
  282. /* fxn-codes for composite templates */
  283. #define o_SUBST                0x1800
  284. #define o_SUBST2                0x1801
  285. #define o_LOGB                    0x1802
  286. #define o_SUM                    0x1803
  287. #define o_PRODUCT                0x1804
  288. #define o_IND_INT                0x1805
  289. #define o_INTEGRAL            0x1806
  290. #define o_LOOPINT                0x1807
  291. #define o_PATHINT                0x1808
  292. #define o_TOTAL                0x1809
  293. #define o_PARTIAL                0x180a
  294.  
  295. #define o_NEWCOL                0x18a0
  296. #define o_NEWROW                0x18a1
  297. #define o_DELROW                0x18a2
  298. #define o_DELCOL                0x18a3
  299. #define o_ADDINDEX            0x18a4
  300. #define o_UPPER                0x18a5
  301. #define o_LOWER                0x18a6
  302. #define o_PREUPPER            0x18a7
  303. #define o_PRELOWER            0x18a8
  304.  
  305. /* special fxn-codes having to do with templates */
  306. #define o_NEGATE                0x1900
  307. #define o_EQUAL                0x1901
  308. #define o_NEWOPERAND            0x1902
  309. #define o_TOGGLEINLINE        0x1904
  310.  
  311. /* fxn codes for rewrite rules */
  312. #define r_SIMPLIFY                        0x2000
  313. #define r_SIMPLIFYSOME                    0x2001
  314. #define r_MULTIPLYOUT                    0x2002
  315. #define r_MULTIPLYOUTONCE                0x2003
  316. #define r_DIFFERENTIATE                    0x2004
  317. #define r_DIFFERENTIATEONCE            0x2005
  318. #define r_INTEGRATE                        0x2006
  319. #define r_NUMBERCRUNCH                    0x2007
  320. #define r_SHOWALLDIGITS                    0x2008
  321. #define r_PULLOUTONETERM                0x2009
  322. #define r_PULLOUTALLTERMS                0x200a
  323. #define r_EVALSUBSTITUTION                0x200b
  324. #define r_FACTOR                            0x200c
  325. #define r_FACTORSOME                        0x200d
  326. #define r_LONGDIVISION                    0x200e
  327. #define r_MATRIXTRANSPOSE                0x200f
  328. #define r_DISTRIBUTEOVEREQUALITY        0x2010
  329. #define r_DISTRIBUTE                        0x2011
  330. #define r_REMOVEDIVISION                0x2012
  331. #define r_REMOVEDIVISIONONELEVEL        0x2013
  332. #define r_REMOVENEGPOWERS                0x2014
  333. #define r_REMOVENEGPOWERSONELEVEL    0x2015
  334. #define r_SOLVEFOR                        0x2016
  335. #define r_MATRIXALGEBRA                    0x2017
  336. #define r_ORDERSUM                        0x2018
  337. #define r_ORDERSUMOTHERWAY                0x2019
  338. #define r_ADDFRACTIONS                    0x201a
  339. #define r_EVALUATE                        0x201b
  340. #define r_REMOVEPARENSFLATTEN            0x201c
  341. #define r_COPYPASTECRUNCH                0x201d
  342. #define r_TRIGTOBASETRIG                0x201e
  343. #define r_TRIGTOEXPONENTS                0x201f
  344. #define r_VECTORSTOMATRICES            0x2020
  345. #define r_TAYLOREXPAND                    0x2021
  346. #define r_SPHERICAL                        0x2022
  347. #define r_CYLINDRICAL                    0x2023
  348. #define r_RECTANGULAR                    0x2024
  349. #define r_STOR                                0x2025
  350. #define r_RTOS                                0x2026
  351. #define r_CTOR                                0x2027
  352. #define r_RTOC                                0x2028
  353.  
  354. #define r_MOVERIGHT                        0x2100
  355. #define r_MOVERIGHTINTO                    0x2101
  356. #define r_MOVERIGHTALLTHEWAY            0x2102
  357. #define r_MOVELEFT                        0x2103
  358. #define r_MOVELEFTINTO                    0x2104
  359. #define r_MOVELEFTALLTHEWAY            0x2105
  360. #define r_MOVEUP                            0x2106
  361. #define r_MOVEDOWN                        0x2107
  362. #define r_MOVELEFTSWAP                    0x2108
  363. #define r_MOVERIGHTSWAP                    0x2109
  364.  
  365. #define r_CUT                                0x2200
  366. #define r_COPY                                0x2201
  367. #define r_PASTE                            0x2202
  368. #define r_CLEAR                            0x2203
  369. #define r_DEFINEFROMSINGLE                0x2204
  370. #define r_APPLYDEFINITION                0x2205
  371.  
  372.  
  373. typedef struct GreekCharInfo
  374.     {
  375.     char*        str;
  376.     char        f,c;
  377.     } GreekCharInfo;
  378.  
  379. #define GREEK_CHAR(n) Greek_Stuff[(n) - c_ALPHA].c
  380. extern GreekCharInfo    Greek_Stuff[];
  381. #define NUM_GREEK 0x26
  382.  
  383. #define s_ALPHA                'a'
  384. #define s_BETA                    'b'
  385. #define s_CHI                    'c'
  386. #define s_delta                'd'
  387. #define s_DELTA                'D'
  388. #define s_EPSILON                'e'
  389. #define s_phi                    'f'
  390. #define s_phi1                    'j'
  391. #define s_PHI                    'F'
  392. #define s_gamma                'g'
  393. #define s_GAMMA                'G'
  394. #define s_ETA                    'h'
  395. #define s_IOTA                    'i'
  396. #define s_KAPPA                'k'
  397. #define s_lambda                'l'
  398. #define s_LAMBDA                'L'
  399. #define s_MU                    'm'
  400. #define s_NU                    'n'
  401. #define s_pi                    'p'
  402. #define s_PI                    'P'
  403. #define s_theta                'q'
  404. #define s_theta1                'J'
  405. #define s_THETA                'Q'
  406. #define s_RHO                    'r'
  407. #define s_sigma                's'
  408. #define s_sigma1                'V'
  409. #define s_SIGMA                'S'
  410. #define s_TAU                    't'
  411. #define s_upsilon                'u'
  412. #define s_Upsilon                0xa1
  413. #define s_omega                'w'
  414. #define s_omega1                'v'
  415. #define s_OMEGA                'W'
  416. #define s_xi                    'x'
  417. #define s_XI                    'X'
  418. #define s_psi                    'y'
  419. #define s_PSI                    'Y'
  420. #define s_ZETA                    'z'
  421. #define s_INFINITY            0xa5
  422. #define s_PERPENDICULAR        0x5e
  423. #define s_ELLIPSIS            0xbc
  424. #define s_ALEPH                0xc0
  425. #define s_IFRAKTUR            0xc1
  426. #define s_RFRAKTUR            0xc2
  427. #define s_WEIERSTRAUSS        0xc3
  428. #define s_EMPTYSET            0xc6
  429. #define s_PARTIALDIFF        0xb6
  430. #define s_MINUTE                0xa2
  431. #define s_SECOND                0xb2
  432. #define s_DEGREE                0xb0
  433.  
  434.